package miku.firstgame.net.pack
{
	import miku.firstgame.constrants.ProtocalConstants;
	import miku.firstgame.model.User;
	import miku.firstgame.net.ByteArrayEx;

	public class UserEnterRoomResponsePack extends AbstractReponsePack
	{
		public var roomId:int;
		public var user:User;

		public function UserEnterRoomResponsePack(data:ByteArrayEx)
		{
			super(data);
		}

		override public function decode():void
		{
			super.decode();
			data.position = 4;
			roomId = data.readUnsignedInt();
			user = User.parseUser(data);
		}

		override public function get tag():int
		{
			return ProtocalConstants.USER_ENTER_ROOM
		}
	}
}
